<include file="Public/min-header"/>

<link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>

<div class="wrapper"> 
  <!-- Content Header (Page header) -->
  <include file="Public/breadcrumb"/>
  
  <!-- Main content -->
  <section class="content">
    <div class="container-fluid">
      <div class="panel panel-default">
        <div class="panel-heading">
          <h3 class="panel-title"><i class="fa fa-list"></i> 推送列表 
             <a href="{:U('Admin/Wechat/add_news')}">
              <button type="button" class="btn btn-info">
                  <i class="ace-icon fa fa-plus bigger-110"></i>
              </button>
              </a>
			<a href="javascript:;" class="btn pull-right btn-default" data-url="http://www.tp-shop.cn/Doc/Index/article/id/178/developer/phper.html" onclick="get_help(this)"><i class="fa fa-question-circle"></i> 帮助</a>
		  </h3>
        </div>
        <div class="panel-body">
          <div id="ajax_return">
              <div class="table-responsive">
                  <table class="table table-bordered table-hover">
                      <thead>
                      <tr>
                          <td style="width: 1px;" class="text-center">
                              <input type="checkbox" onclick="$('input[name*=\'selected\']').prop('checked', this.checked);">
                          </td>
                          <td class="text-center">关键词</td>
                          <td class="text-center">图文列表</td>
                          <td class="text-center">操作</td>
                      </tr>
                      </thead>
                      <tbody>

                      <volist name="lists" id="list">
                          <tr>
                              <td class="text-center">
                                  <input type="checkbox" name="selected[]" value="{$list.id}">
                              </td>
                              <td class="text-center">{$list.keyword}</td>
                              <td class="text-center"><button class="btn btn-info btn-sm" type="button" onclick="preview('{$list.pid}')">预览</button></td>
                              <td class="text-center">
                                  <a href="javascript:void(0);" data-href="{:U('Admin/Wechat/del_news',array('id'=>$list['id']))}" onclick="del('{$list[id]}',this)" id="button-delete6" data-toggle="tooltip" title="" class="btn btn-danger" data-original-title="删除"><i class="fa fa-trash-o"></i></a>
                              </td>
                          </tr>
                      </volist>
                      </tbody>
                  </table>
              </div>
              <div class="row">
                  <div class="col-sm-6 text-left"></div>
                  <div class="col-sm-6 text-right">{$page}</div>
              </div>
          </div>
        </div>
      </div>
    </div>
    <!-- /.row --> 
  </section>
  <!-- /.content --> 
</div>
<!-- /.content-wrapper --> 
<script>
        // 删除操作
        function del(id,t)
        {
            if(!confirm('确定要删除吗?'))
                return false;

            location.href = $(t).data('href');
        }
        function preview(id){
            layer.open({
                type: 2,
                title: false,
                closeBtn: false,
                area: ['320px','500px'],
                skin: 'layui-layer-nobg', //没有背景色
                shadeClose: true,
                content: "/index.php/Admin/Wechat/preview/id/"+id,
            });
        }
</script> 
</body>
</html>